<?php

class ShowMemberWorkflowNodeAction extends AbstractRunTimeWorkflowNodeAction
{
  
  const IN_MEMBER_ID = 'show_member_workflow_node_action_member_id';

  protected function configure ()
  {
    $this->setDefaultOption(self::OPTION_LABEL, 'Mitglied anzeigen');
  }

  /**
   * @param AbstractWorkflowContainer $container
   */
  public function execute (AbstractWorkflowContainer $container)
  {
  
  }

  /**
   * @return string
   */
  public function getRouteName ()
  {
    return 'member_show';
  }

  /**
   * @return array
   */
  public function getRouteParameters ()
  {
    $member_id = $this->node->getContainer()
      ->getValue(self::IN_MEMBER_ID);
    $member = MemberTable::getInstance()->find(array(
      'id' => $member_id));
    
    return array(
      'sf_subject' => $member, 'unit' => $member->getOrganizationalUnit());
  }
}